Introduce batch fk capabilities for floating and planar joints#30
Open
BuildingAtom wants to merge 5 commits intofishbotics:mainfrom
Open
Introduce batch fk capabilities for floating and planar joints#30BuildingAtom wants to merge 5 commits intofishbotics:mainfrom
BuildingAtom wants to merge 5 commits intofishbotics:mainfrom
Conversation
…le batched inputs.
… the DOF of planar and floating joints
fishbotics
reviewed
Oct 21, 2025
Owner
fishbotics
left a comment
There was a problem hiding this comment.
I'm sorry for the super slow reply on our part. These changes are super helpful. I did a pretty major refactor of the library to make it more readable (and have proper types) so merging this is going to be difficult. I'm happy to take it on and push the updates if you're ok with it, but it would be super helpful to know why you removed some of the none-checks.
Also, if you have any tests you've been using to verify correctness, we'd appreciate you sharing those!
| elif self.joint_type == "fixed": | ||
| return self.origin | ||
| elif self.joint_type in ["revolute", "continuous"]: | ||
| if cfg is None: |
Owner
There was a problem hiding this comment.
What's the motivation for these changes?
| translation[:3, 3] = self.axis * cfg | ||
| return self.origin.dot(translation) | ||
| elif self.joint_type == "planar": | ||
| if cfg is None: |
| return self.origin.dot(translation) | ||
| elif self.joint_type == "floating": | ||
| if cfg is None: | ||
| cfg = np.zeros(6, dtype=np.float64) |
| elif self.joint_type == "fixed": | ||
| return np.tile(self.origin, (n_cfgs, 1, 1)) | ||
| elif self.joint_type in ["revolute", "continuous"]: | ||
| if cfg is None: |
Owner
There was a problem hiding this comment.
Is there a reason you're removing the guards against None?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hello, it seemed like urchin's batched forwards kinematics functions didn't have support for planar and floating joints. I went through updated the relevant functions to add that support. To also simplify the forwards kinematics for those two joint types, I added functionality that would unpack a flat list or numpy array to the corresponding 2dof or 6dof inputs for those joints.
So, if you have a planar joint followed by a revolute joint, you can now do [x_val, y_val, rot_val] as your list input instead of [[x_val, y_val], rot_val], which helps with the numpy batching form for forward kinematics.
I also noticed that there were extra None type checks in
get_child_poseandget_child_poses, so I also went ahead and removed those in one of those commits, but if that's a no-go, I can remove that commit.